package cn.edu.scau.cmi.wujiaxian.exercise6;

public class Example6_9 {
	public static void main(String[] args) {
		E e = new E();
		int sum = e.sub(30, 20);
		int sub = e.sub(30, 20);
		System.out.println("sum=" + sum);
		System.out.println("sub=" + sub);
	}
}

abstract class D {
	abstract int sum(int x, int y) ;
	int sub(int x, int y) {
		return x - y;
	}
}

class E extends D {
	@Override
	int sum(int x, int y) {
		return x + y;
	}
}

